Could be wrong, but I *think* you want to set the CoordMotion.IsSimulation() property true to enable simulation. I also don't think you need (or want) to explicitly create the KM_Interpreter. Just create the KM_Controller, and it will create the KM_Interpreter
for you.
Regards,
Ray L.
--- In DynoMotion@yahoogroups.com, "toby_rule" <trule@...> wrote:
>
> Hello,
>
> I am trying to use the simulate feature of the KMotion interpreter in KMotion_dotNet. How do I initialize the KMotion interpreter without a board attached? I tried doing something like:
>
> .KM_Controller.KM_Interpreter kmInterpreter = new KMotion_dotNet.KM_Controller.KM_Interpreter(0);
>
> But it gave me a fairly non-verbose DMException, which I am attaching below.
>
> I spent quite a bit of time working with the KMotionCNC code (C++/MFC) but that was a couple years ago, and I'm new to the dot net interface. So the solution is probably obvious, but a couple hours searching didn't turn anything up so hopefully you can assist
me.
>
> Thanks,
>
> Toby Rule
>
>
> KMotion_dotNet.DMException was caught
> Message=Exception of type 'KMotion_dotNet.DMException' was thrown.
> Source=KMotion_dotNet
> StackTrace:
> at KMotion_dotNet.KM_Controller.KM_Interpreter..ctor(Int32 boardnumber)
> at LaserTech.eCut.SimProgramModel..ctor() in C:\Users\trule\Documents\LCM\lcm\ProgramControl\SimProgramModel.cs:line 32
> InnerException:
>